Skip to content

fix(message): reject empty bodies - #397

Merged
schickling merged 1 commit into
mainfrom
schickling-assistant/2026-08-30-fix-empty-message-body
Aug 31, 2026
Merged

fix(message): reject empty bodies#397
schickling merged 1 commit into
mainfrom
schickling-assistant/2026-08-30-fix-empty-message-body

Conversation

@schickling-assistant

Copy link
Copy Markdown
Contributor

Problem

st2 message send accepted an empty -m value or empty stdin and published a valid headers-only message. The sender saw success, while the recipient received no message content.

Goal

Reject an empty message before any recipient or sender artifact is written.

Verification

  • CI=1 nix develop -c cargo test --test message_cli send_rejects_empty_explicit_and_stdin_bodies_without_persisting_a_message -- --exact — 1 passed
  • nix flake check --print-build-logs --no-write-lock-file — passed all 16 Linux checks

Complexity

No new complexity. Validation stays at the existing shared body-input boundary.

Concerns

Whitespace-only bodies and literal backslash-n byte sequences remain valid content. Shell escaping remains the caller's responsibility.

Friction & bottlenecks

Local Nix tracing emitted an ignored permissions warning. Validation itself passed.

Follow-ups

None.

References

Closes #226

Posted on behalf of @schickling
field value
agent_identity dev3.direct.omp.vjwqaz7t
session dev3.vjwqaz7t
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.0.11
agent_runtime OMP 18.0.11
tooling_profile dotfiles@000f2b3

agent-identity: dev3.direct.omp.vjwqaz7t
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.11
agent-runtime: OMP 18.0.11
tooling-profile: dotfiles@000f2b3
@schickling-assistant
schickling-assistant marked this pull request as ready for review August 30, 2026 23:16
@schickling
schickling merged commit 67b18b7 into main Aug 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

message send accepts and delivers a valid-looking headers-only message

2 participants